package com.bird.thread.base.uncaughtexception;

/**
 * @author sijunqiang
 * @data 2021/7/3 14:08
 * @description: 验证：当子线程抛出异常的时候 主线程还在正常的运行 且子线程抛出的异常不容易发现。
 */
public class ExceptionInChildThread implements Runnable {
    public static void main(String[] args) {
        new Thread(new ExceptionInChildThread()).start();
        for (int i = 0; i < 1000; i++) {
            System.out.println(i);
        }
    }

    @Override
    public void run() {
        throw new RuntimeException();

    }
}
